﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditDeliveryArea.aspx.cs"
    Inherits="Admin_EditDeliveryArea" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>编辑区域</title>
    <link href="AdminCSS/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        配送区域名：<asp:TextBox ID="txtDeliveryArea" runat="server"></asp:TextBox>
        &nbsp;排序号：<asp:TextBox ID="txtOrderValue" runat="server"></asp:TextBox>
        &nbsp;<asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="添加" />
        <asp:Button ID="btnReturn" runat="server"  Text="退出" CausesValidation="False" 
            onclick="btnReturn_Click" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="区域名不可为空"
            ControlToValidate="txtDeliveryArea" Display="Dynamic"></asp:RequiredFieldValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="排序不可为空"
            ControlToValidate="txtOrderValue" Display="Dynamic"></asp:RequiredFieldValidator>
        <asp:HiddenField ID="HId" runat="server" />
        <asp:HiddenField ID="HParentId" runat="server" />
        &nbsp;<table border="0" cellpadding="0" cellspacing="1" width="100%" style="background: Black;">
            <tr style="height: 27px">
                <td align="center" style="background: #DFDEDC;">
                    ID
                </td>
                <td align="center" style="background: #DFDEDC;">
                    配送区域名
                </td>
                <td align="center" style="background: #DFDEDC;">
                    排序号
                </td>
                <td align="center" style="background: #DFDEDC;">
                    操作
                </td>
            </tr>
            <asp:Repeater ID="rptDeliveryArea" runat="server" OnItemCommand="rptDeliveryArea_ItemCommand">
                <ItemTemplate>
                    <tr style="background: White; height: 27px;">
                        <td align="center">
                            <%#Eval("Id") %>
                        </td>
                        <td align="center">
                            <%#Eval("DeliveryAreaName")%>
                        </td>
                        <td align="center">
                            <%#Eval("OrderValue") %>
                        </td>
                        <td align="center">
                            <asp:Button ID="btnDelete" CausesValidation="false" Text="删除" CommandArgument='<%#Eval("Id")%>'
                                CommandName="Del" runat="server" />
                            <asp:Button ID="btnEdit" CausesValidation="false" Text="编辑" CommandArgument='<%#Eval("Id")%>'
                                CommandName="Edit" runat="server" />
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
    </form>
</body>
</html>
